

export const ColumnProps = [
    {
        title: '菜单名',
        dataIndex: 'name',
        width: 200,
        ellipsis: true
    },
    {
        title: '类型',
        dataIndex: 'type',
        width: 100,
        ellipsis: true
    },
    {
        title: '图标',
        dataIndex: 'icon',
        width: 100,
        ellipsis: true,
        customRender: (val) => {
            return <span v-html={val.text}></span>
        }
    },
    {
        title: '路径',
        dataIndex: 'path',
        width: 200,
        ellipsis: true
    },
    {
        title: '创建人',
        dataIndex: 'creator',
        width: 200,
        ellipsis: true
    },
    {
        title: '创建时间',
        dataIndex: 'createTime',
        width: 300,
        ellipsis: true
    },
    {
        title: '修改人',
        dataIndex: 'updater',
        width: 200,
        ellipsis: true
    },
    {
        title: '修改时间',
        dataIndex: 'updateTime',
        width: 300,
        ellipsis: true
    },
]


export const RuleProps = {
    name: [{ required: true, message: '菜单不能为空' }],
    type: [{ required: true, message: '类型不能为空' }],
    icon: [{ required: true, message: '图标不能为空' }],
    buttonType: [{ required: true, message: '按钮执行事件不能为空' }],
    routeId: [{ required: true, message: '请选择路由' }],
    useDevice: [{ required: true, message: '请选择使用设备' }],
}


export const FormProps = {
    id: '',
    parentId: '',
    name: '',
    type: '',
    icon: '',
    buttonType: '',
    routeId: '',
    useDevice: '',
    color: '#000000'
}


export const FilterItems = [
    {
        type: 'input',
        label: '菜单名',
        key: 'name',
        placeholder: '请输入菜单名'
    }
]


export const FormItems = [
    {
        type: 'treeSelect',
        label: '父级节点',
        key: 'parentId',
        data: [ ],
        isShow: true,
        placeholder: '请选择父级节点'
    },
    {
        type: 'input',
        label: '菜单名',
        key: 'name',
        isShow: true,
        placeholder: '请输入菜单名',
        maxLength: 50
    },
    {
        type: 'select',
        label: '类型',
        key: 'type',
        data: [ ],
        isShow: true,
        placeholder: '请选择菜单类型'
    },
    {
        type: 'select',
        label: '使用设备',
        key: 'useDevice',
        data: [ ],
        isShow: true,
        placeholder: '请选择使用设备'
    },
    {
        type: 'color',
        label: '颜色',
        key: 'color',
        data: [ ],
        isShow: true,
        placeholder: '请选择颜色'
    },
    {
        type: 'select',
        label: '按钮执行事件',
        key: 'buttonType',
        data: [ ],
        isShow: false,
        placeholder: '请选择执行事件'
    },
    {
        type: 'treeSelect',
        label: '路由',
        key: 'routeId',
        data: [ ],
        isShow: true,
        placeholder: '请选择路由'
    },
]


export const FilterModelProps = {
    total: 0,
    current: 1,
    pageSize: 10,
    name: '',
}
